<template>
	<div>
		<h1>DEMO2</h1>
		<button @click="change">更新值</button>
		{{name}}
	</div>

</template>

<script>
	export default {
		beforeCreate() {
			console.log("DEMO2 beforeCreate");
		},
		created() {
			console.log("DEMO2 created");
		},
		beforeMount() {
			console.log("DEMO2 beforeMount");
		},
		mounted() {
			console.log("DEMO2 mounted");
		},
		beforeUpdate() {
			console.log("DEMO2 beforeUpdate");
		},
		updated() {
			console.log("DEMO2 updated");
		},
		beforeDestroy() {
			console.log("DEMO2 beforeDestroy");
		},
		destroyed() {
			console.log("DEMO2 destroyed");
		},
		data() {
			return {
				name: 1
			}
		},
		methods: {
			change() {
				this.name = 2
			}
		}
	}
</script>

<style scoped>
</style>